(require 'ido)
(progn
  (defalias 'list-buffers 'ibuffer)
  ;; make buffer switch command do suggestions, also for find-file command
  (ido-mode 1)

  ;; show choices vertically
  (if (version< emacs-version "25")
      (setq ido-decorations "\n")
    (setf (nth 2 ido-decorations) "\n"))

  (setq ido-use-filename-at-point 'guess)
  (setq ido-everywhere t)

  ;; show any name that has the chars you typed
  (setq ido-enable-flex-matching t)

  ;; use current pane for newly opened file
  (setq ido-default-file-method 'selected-window)

  ;; use current pane for newly switched buffer
  (setq ido-default-buffer-method 'selected-window)

  ;; stop ido from suggesting when naming new file
  (define-key (cdr ido-minor-mode-map-entry) [remap write-file] nil))
(provide 'init_ido-mode)
